const obj = {
  'A': function (salary) {
    return salary * 4
  },
  'B': function (salary) {
    return salary * 3
  },
  'C': function (salary) {
    return salary * 2
  },
  'D': function (salary) {
    return salary
  },
  'E': function (salary) {
    return -salary
  }
}
function getSalary (level, salary) {
  return obj[level](salary)
}
let a = getSalary('A', 1000)
let b = getSalary('B', 1000)
let c = getSalary('C', 1000)
let d = getSalary('D', 1000)

console.dir({ a, b, c, d });
